﻿@{
    ViewBag.Title = "小博客首页 - 用.Net开发的博客";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var tags = ViewBag.tags as List<TagModel>;//热门标签
    var hotClickArticles = ViewBag.hotClickArticles as List<ArticleModel>;//点击排行
    var newArticles = ViewBag.newArticles as List<ArticleModel>;//最新文章
    var recomArticles = ViewBag.recomArticles as List<ArticleModel>;//推荐排行
    var hotUsers = ViewBag.hotUsers as List<AccountModel>;//人气博客
    var regUsers = ViewBag.regUsers as List<AccountModel>;//最近加入
}
<div style="padding:5px">
    <div class="home-left">
        <div class="slideBox">
            <ul class="items">
                <li><a href="#" title="打个广告，嘻嘻…"><img src="~/Content/Images/index/1.jpg"></a></li>
                <li><a href="#" title="静静的守候~"><img src="~/Content/Images/index/2.jpg"></a></li>
                <li><a href="#" title="我只是委屈了…"><img src="~/Content/Images/index/3.jpg"></a></li>
                <li><a href="#" title="I love dogs~"><img src="~/Content/Images/index/4.jpg"></a></li>
                <li><a href="#" title="你关注，我分享！"><img src="~/Content/Images/index/5.jpg"></a></li>
            </ul>
        </div>
        <div class="index-news">
            <ul>
                <li class="cur">最新动态</li>
            </ul>
        </div>
        <div id="home-Articles-List">
        </div>
        <div id="layerpage" class="layerPager"></div>
    </div>
    <div class="home-right">
        <div class="tit01">
            <h3>关注<i class="icon-heart-empty"></i>小博客</h3>
            <div class="gzwm">
                <ul>
                    <li><a class="xlwb" href="javascript:;" target="_blank">新浪微博</a></li>
                    <li><a class="rss" href="/home/rss" target="_blank">RSS</a></li>
                    <li><a class="wx" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=VDc8MSY9Jzx5IDwxeTg7IjEUJSV6Nzs5">邮箱</a></li>
                </ul>
            </div>
        </div>
        <div class="dv-sou">
            <span class="dv-sou-main">
                <input type="text" placeholder="请输入关键词" /><span onclick="baidu(this)"><i class="icon-search"></i> 搜索一下</span>
            </span>
        </div>
        <div class="ms-top">
            <ul class="hd" id="tab">
                <li class="cur"><a href="/">点击排行</a></li>
                <li><a href="/">最新文章</a></li>
                <li><a href="/">本站推荐</a></li>
            </ul>
        </div>
        <div class="ms-main" id="ms-main">
            <div style="display: block;" class="bd bd-news">
                <ul>
                    @foreach (var item in hotClickArticles.Default())
                    {
                        <li><a href="@Url.Content("~/"+item.AccountId+"/blog/article/"+ item.ID)" target="_blank">@item.Title</a></li>
                    }
                </ul>
            </div>
            <div class="bd bd-news">
                <ul>
                    @foreach (var item in newArticles.Default())
                    {
                        <li><a href="@Url.Content("~/"+item.AccountId+"/blog/article/"+ item.ID)" target="_blank">@item.Title</a></li>
                    }
                </ul>
            </div>
            <div class="bd bd-news">
                <ul>
                    @foreach (var item in recomArticles.Default())
                    {
                        <li><a href="@Url.Content("~/"+item.AccountId+"/blog/article/"+ item.ID)" target="_blank">@item.Title</a></li>
                    }
                </ul>
            </div>
        </div>
        <div class="cloud">
            <h3><i class="icon-tags"></i> 热门标签</h3>
            <ul>
                @{ int ic = 0;
                    var css = new string[] { "cloud-1", "cloud-2", "cloud-3" };
                    foreach (var item in tags.Default())
                    {
                        ic++;
                        <li class="@(ic%3==0?css[0]:ic%2==0?css[1]:css[2])"><a href="#">@(item.TagName)(@item.ArticleModels.Count)</a></li>
                    }}
            </ul>
        </div>
        <div class="hotuser">
            <h3><i class="icon-star-empty"></i>人气博客</h3>
            <ul>
                @for (int i = 0; i < hotUsers.Default().Count(); i++)
                {
                    <li class="@(i<3?"top":"")">
                        <span class="hotuser-top-span">
                            <em>@(i + 1)</em>
                            <a href="@Url.Content("~/"+hotUsers[i].Account)" title="@hotUsers[i].NickName">@hotUsers[i].NickName.Sub(10)</a>
                            <span class="num2">粉丝(@hotUsers[i].ConcernMeUsers.Count)</span>
                        </span>
                    </li>
                }
            </ul>
        </div>
        <div class="reg-users">
            <div class="new-reg">
                最新注册
            </div>
            <div class="marquee-main">
                <ul>
                    @foreach (var item in regUsers)
                    {
                        <li>
                            <span style="width:190px;display:inline-block;"><a target="_blank" href="@Url.Content("~/"+item.Account)">@item.NickName.Sub(10)</a></span>
                            <span style="width:130px;font-size:14px;">@item.RegTime.ToString("yyyy-MM-dd HH:mm:ss")</span>
                        </li>
                    }
                </ul>
            </div>
        </div>

        <div class="youlian">
            <h3>友情链接</h3>
            <ul>
                <li><a target="_blank" href="http://www.cnblogs.com/">博客园</a></li>
                <li><a target="_blank" href="http://blog.csdn.net/">CSDN博客</a></li>
                <li><a target="_blank" href="https://git.oschina.net/">开源中国</a></li>
                <li><a target="_blank" href="http://docode.top">嘟嘛网</a></li>
                <li><a target="_blank" href="http://www.p700.cn">朱凯博客</a></li>
                <li><a target="_blank" href="http://bing-net.cn">BinGe博客</a></li>
            </ul>
        </div>
    </div>
</div>
<link href="~/Scripts/slideBox/jquery.slideBox.css" rel="stylesheet" />
<script src="~/Scripts/slideBox/jquery.slideBox.min.js"></script>
<script src="~/Scripts/Blog/home.js"></script>